package com.pth.admin.action;

import com.opensymphony.xwork2.ActionSupport;
import com.pth.model.Zhinan;
import com.pth.service.ZhinanService;
import com.pth.utils.timeUtil;

public class AddZhinanAction extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private ZhinanService zhinanService;
	private Zhinan zhinan;
	public ZhinanService getZhinanService() {
		return zhinanService;
	}
	public void setZhinanService(ZhinanService zhinanService) {
		this.zhinanService = zhinanService;
	}
	public Zhinan getZhinan() {
		return zhinan;
	}
	public void setZhinan(Zhinan zhinan) {
		this.zhinan = zhinan;
	}
	
	
	@Override
	public String execute() throws Exception {

		zhinan.setPublishtime(timeUtil.getCurrentDate());
		zhinan.setScannum(0);
		zhinanService.add(zhinan);
		return SUCCESS;
	}
	
	
}
